package com.qianya.weishi_server.constant;

/**
 * 任务调度通用常量
 */
public class ScheduleConstant {
    public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";

    /**
     * 执行目标key
     */
    public static final String TASK_PROPERTIES = "TASK_PROPERTIES";

    /**
     * 默认
     */
    public static final String MISFIRE_DEFAULT = "0";

    /**
     * 立即触发执行
     */
    public static final String MISFIRE_IGNORE_MISFIRES = "1";

    /**
     * 触发一次执行
     */
    public static final String MISFIRE_FIRE_AND_PROCEED = "2";

    /**
     * 不触发立即执行
     */
    public static final String MISFIRE_DO_NOTHING = "3";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = {"com.qianya"};

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";


    /**
     * 作用范围scope（SysJob，Prescription，WearableConfig）
     */
    public static final Integer PATIENT_SCOPE = 1;

    public static final Integer PATIENT_PLAN_SCOPE = 2;

    public static final Integer PATIENT_PLAN_STAGE_SCOPE = 3;

    /**
     * 配置来源source（SysJob）
     */
    public static final Integer APP_SOURCE = 1;

    public static final Integer WEARABLE_SOURCE = 2;

    /**
     * app、手环内置提醒配置ID（RemindConfig、WearableRemindConfig）
     */
    public static final Integer MEDICINE_REMIND = 1;

    public static final Integer RECONSULTATION_REMIND = 2;

    public static final Integer DETECTION_REMIND = 3;


    public enum Status {
        /**
         * 正常
         */
        NORMAL("1"),
        /**
         * 暂停
         */
        PAUSE("0");

        private String value;

        Status(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

}
